<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- 1.修饰符lazy只有在输入框失去焦点或者用户敲回车的时候才会更新数据 -->
        <input type="text" v-model.lazy="msg">
        <h2>{{msg}}</h2>
        <!-- 2.修饰符number把数字的类型改成number类型 -->
        <input type="text" v-model.number="age">
        <h2>{{typeof age}}</h2>
        <!-- 3.修饰符trim去除变量两变得空格 -->
        <input type="text" v-model.trim="name">
        <h2>{{name}}</h2>
    </div>
</body>
<script src='../js/vue.js'></script>
<script>
    let app = new Vue({
        el: '#app',
        data: {
             msg:'hello vue.js',
             age:20,
             name:''
        },
        methods: {}
        
    })
</script>
</html>